<%@ Page Language="VB" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="false" CodeFile="StatusChangeReason.aspx.vb" Inherits="Admin_StatusChangeReason" title="Admin - Status Change Reasons" %>
<%@ Register Src="SubNavControls/DropdownSubNavControl.ascx" TagName="DropdownSubNavControl" TagPrefix="uc1" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<uc1:DropdownSubNavControl ID="SubNavControl1" runat="server" />
<table cellpadding="0" cellspacing="0">
<tr><td style="width:20px;" rowspan="2"></td>
<td><h1><a id="pagecontent">Admin - Status Change Reasons</a></h1></td>
    <td align="right" style="width:65%"><asp:Label ID="Label1" runat="server" AssociatedControlID="StatusDropdown" Text="Status:" CssClass="adminSelectLabel"></asp:Label>
    <asp:DropDownList ID="StatusDropdown" runat="server" CssClass="adminSelectForm" DataTextField="Description" DataValueField="CaseStatusId" AutoPostBack="false">
    </asp:DropDownList>
    <asp:Button ID="SubmitStatusButton" runat="server" Text="Go" /></td>
    </tr><tr>
    <td colspan="2" align="center">
    <cc2:ScrollingGridView ID="StatusReasonScrollingGridView" runat="server" CssClass="gridOffsetSmall" IsFixedColumn="true" AutoGenerateColumns="False" Caption="Manage the list of reasons for each status in the system." CaptionAlign="Top" ToolTip="155"
             DataKeyNames="Id,CaseStatusId" CellPadding="5" BorderColor="#21334B" 
                BorderStyle="Solid" GridLines="Vertical" AllowSorting="true" EmptyDataText="No Reasons are set up for this status.">
        <HeaderStyle  CssClass="adminHeaderStyle" BackColor="#C3CAD4" BorderColor="#21334B" VerticalAlign="Top" />
        <RowStyle CssClass="adminColumnStyle" />
        <Columns>
            <asp:TemplateField HeaderText="Description" SortExpression="Description">
            <ItemStyle Width="410px" />
            <HeaderStyle Width="416px" />
            <ItemTemplate><%#Eval("Description")%></ItemTemplate>
            <EditItemTemplate><asp:TextBox Id="EditDescriptionTextBox" runat="server" Text='<%#Eval("Description")%>'></asp:TextBox>
            </EditItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowEditButton="True" HeaderText="Action" AccessibleHeaderText="Action">
             <ItemStyle HorizontalAlign="Center" Width="110px" />
             <HeaderStyle Width="110px" />
            </asp:CommandField>        
            <asp:TemplateField HeaderText="Delete" AccessibleHeaderText="Delete">
            <ItemStyle HorizontalAlign="Center" Width="80px" />
             <HeaderStyle Width="110px" />
            <ItemTemplate>
              <asp:Button Id="DeleteButton" runat="server" Text="Delete" CommandArgument='<%#Eval("CaseStatusReasonId")%>' OnClick="DeleteReasonButton_Click" />
            </ItemTemplate>
            </asp:TemplateField>
            
        </Columns>
        <AlternatingRowStyle BackColor="#E8ECF4" /></cc2:ScrollingGridView>
    </td>
    </tr>
    </table>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderFixedAdmin" Runat="Server">
<table><tr><td><asp:Label Id="AddReasonLabel" runat="server" AssociatedControlId="AddReasonTextBox" CssClass="adminSelectForm">Add Reason for this Status:</asp:Label></td>
    <td><asp:TextBox Id="AddReasonTextBox" runat="server"></asp:TextBox></td>
    <td><asp:Button Id="AddReasonButton" runat="server" Text="Add" /></td>
    </tr></table>
</asp:Content>

